import query from './atom/db/query';

declare const action_id: string;
declare const session_id: string;
declare const spaceid: string;

interface Message {
	criteria: object,
	asc: string[]
}

async function atom(msg: Message) {
	const systemid = '5991';
	const q = query(action_id, session_id, spaceid, systemid);
	q.prepare('class_room_picture', ['_id', 'classroom_id', 'comm_picture_name', 'comm_picture_no', 'pic_path', 'fzno', 'house_name', 'house_number'], msg.criteria, 0, 1, msg.asc);
	const class_room_pics = await q.exec();
	return class_room_pics[0];
}
